package com.wang.controller;

import com.wang.entity.Repair;
import com.wang.service.RepairService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@RestController
@RequestMapping("/repair")
public class RepairController {
    @Resource
    private RepairService repairService;
    @RequestMapping("/update")
    public void updateRepair(Repair repair) {
        repairService.updateRepair(repair);

    }
    @RequestMapping("/get")
    public List<Repair> getRepair(String content, LocalDateTime startDate, LocalDateTime endDate) {
        return repairService.getRepair(content,startDate,endDate);
    }
}
